<?php

namespace zhtfrontend\models\datas;

use Yii;

/**
 * This is the model class for table "{{%gallery_img}}".
 *
 * @property integer $id
 * @property integer $object_id
 * @property string $model_name
 * @property string $img_url
 * @property integer $sort
 */
class GalleryImg extends \zhtfrontend\components\bases\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%gallery_img}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['object_id', 'sort'], 'integer'],
            [['model_name'], 'string', 'max' => 50],
            [['img_url'], 'string', 'max' => 100]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('zhtfrontend', '自增编号'),
            'object_id' => Yii::t('zhtfrontend', '对象id'),
            'model_name' => Yii::t('zhtfrontend', '模型名称'),
            'img_url' => Yii::t('zhtfrontend', '商品图片地址'),
            'sort' => Yii::t('zhtfrontend', '排序'),
        ];
    }
}
